from django.contrib import admin
from django.contrib.auth.admin import UserAdmin

from main.models import CarsObject,User,VersionControl,Logs
# Register your models here.
@admin.register(CarsObject)
class CarsObjectAdmin(admin.ModelAdmin):
    '''地区模型管理类 管理页面显示内容'''
    # list_per_page = 10 #指定每页显示条数
    list_display = ['id','status','user']#显示内容

@admin.register(User)
class UserObjectAdmin(UserAdmin):
    list_display = ['id','username','last_login','is_superuser','is_staff']

# admin.site.register(CarsObject,CarsObjectAdmin) #注册页面及其对应的管理页面ad
admin.site.site_header = '巡检小车控制系统后台管理'
admin.site.site_title = '后台管理'

@admin.register(VersionControl)
class VersionControlAdmin(admin.ModelAdmin):
    list_display = ['version','upLoad_time','download_num','detail']

@admin.register(Logs)
class LogsAdmin(admin.ModelAdmin):
    list_display = ['date','equName','detail','car','state','isFinished','user']